<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>200-正则-正则体验.html</title>
</head>
<body>
	
</body>
<script>
	var str ="abc 657 846 345 ";
	var result = [];
	var tmp = "";
	for(var i =0;i<str.length;i++){
		if(!isNaN(parseInt(str.charAt(i)))){
			tmp = tmp+str.charAt(i);
		}else{
			if(tmp){
				result.push(tmp);
				tmp = "";
			}
			
		}
	}
	if(tmp){
		result.push(tmp);
		tmp = "";
	}
	console.log(result);

	// console.log(str.match(/\d+/g));
	console.log(str.replace(/\d+/g,"*"));
</script>
</html>